#!/bin/bash

openssl genrsa -out rsa_private_key.pem.tmp 1024
openssl pkcs8 -nocrypt -topk8 -inform PEM -in rsa_private_key.pem.tmp -outform PEM > rsa_private_key.pem
rm rsa_private_key.pem.tmp

echo ""
echo "private key =>"
cat rsa_private_key.pem

openssl rsa -in rsa_private_key.pem -pubout -out rsa_public_key.pem
echo ""
echo "public key =>"
cat rsa_public_key.pem

